<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>员工密码修改</title>

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="emp/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="emp/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="emp/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="emp/css/animate.min.css" rel="stylesheet">
    <link href="emp/css/style.min862f.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改密码 </h5>
                    </div>
                    <div class="ibox-content">
                        <form action='all_emp?flag=update_psw&id=${emp.id }' method="post" class="form-horizontal">
                            <div class="form-group">
                             <div class="ibox-content">
                                <label class="col-sm-3 control-label">原密码</label>
                                <span style='color:red'>${error }</span>
                                <div class="col-sm-8">
                                    <input type="text" name="old_psw" class="form-control" placeholder="若是管理员添加，默认密码为123456">
                                    </div>
                             </div>
                        
                  
                    
                     <div class="ibox-content" style="margin-top: 50px">
                                <label class="col-sm-3 control-label">新密码:</label>

                                <div class="col-sm-8">
                                    <input type="text" name="new_psw1" class="form-control" id='new_psw1'>
                                </div>
                            </div>
                 
                    
                    
                    <div class="ibox-content" style="margin-top: 50px">
                                <label class="col-sm-3 control-label">再次输入:</label>
								<span id='same'></span>
                                <div class="col-sm-8">
                                    <input type="text" name="new_psw2" class="form-control" id='new_psw2' onblur='isSame()'>
                                </div>
                            </div>
                   <div class="col-sm-4 col-sm-offset-6" style="margin-top: 50px">
                          <button class="btn btn-primary" disabled="disabled" id='releaseBtn'>提交</button>
                   </div>
                   	 </div>
                    
                    </form>
           </div>
               	 </div>
                </div>
           </div>
                          
                        
    
    <script src="emp/js/jquery.min.js?v=2.1.4"></script>
    <script src="js/jquery-1.10.2.js"></script>
    <script src="emp/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="emp/js/content.min.js?v=1.0.0"></script>
    <script src="emp/js/plugins/iCheck/icheck.min.js"></script>
    <script>
        
        
        //这里是验证密码输入的两个框是否相同
        function isSame(){
				var new_psw1=$("#new_psw1").val();
				var new_psw2=$("#new_psw2").val();
				if(new_psw1 == new_psw2){
					$("#same").html("密码相同");
					$("#releaseBtn").removeAttr("disabled");
				}else{
					$("#same").html("密码不一致");
					$("#same").css('color','red');
					return false;
				}
			}

		
        
    </script>
</body>


</html>
